using UnityEngine;

public class BCWPhotonTransformView : PhotonTransformView
{
	private Camera mainCamera;

	private bool inParom;

	private Vector3 bodyRotation;

	private Vector3 headRotation;

	public float yCameraAngle;

	public override void OnPhotonSerializeView(PhotonStream stream, PhotonMessageInfo info)
	{
		base.OnPhotonSerializeView(stream, info);
		if (stream.isWriting)
		{
			if (mainCamera == null)
			{
				mainCamera = Camera.main;
			}
			stream.SendNext(mainCamera.transform.eulerAngles.x);
			stream.SendNext(inParom);
		}
		else
		{
			yCameraAngle = (float)stream.ReceiveNext();
			inParom = (bool)stream.ReceiveNext();
		}
	}
}
